package com.syh.service.impl;

import com.syh.mapper.OrdersMapper;
import com.syh.pojo.Orders;
import com.syh.pojo.OrdersExample;
import com.syh.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author syh
 * @date 2023/3/23-17:54
 */
@Service
@SuppressWarnings("all")
public class OrderServiceImpl implements OrderService {
    @Autowired
    OrdersMapper ordersMapper;
    @Override  //查询所有商品
    public List<Orders> selectAll() {
        OrdersExample example = new OrdersExample();
        List<Orders> orderList=ordersMapper.selectByExample(example);
//        List<Shop> shopList=new LinkedList<>();
        return orderList;
    }

    @Override
    public void addorder(Orders order) {
        ordersMapper.insert(order);
    }
}
